home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCMania 84
/
PCMania CD84_1.iso
/
guiacompras
/
JS
/
jsFont.js
next >
Wrap
Text File
|
1999-06-02
|
990b
|
59 lines
/*
* Objeto: jsFont
*
* Javascript v1.0 - Compatibilidad: IE4 y NS4
* Programado por LAGOR [15/02/1999]
*
* HOBBYPRESS S.A.
* Todos los derechos de esta fuente estßn reservados.
*/
function jsFont(doc,url)
{
this.url=url;
this.doc=doc;
this.hSpace=0;
this.vSpace=0;
this.wd=0;
this.hg=0;
this.put=jsFont_Put;
}
function jsFont_Put(text,max)
{
var f=0,ch='',len=0;
for(f=0;f<text.length;f++)
{
ch=text.charAt(f);
switch(ch)
{
case '+':
if (len>=max)
{
this.doc.write('<BR>');
len=0;
continue;
}
else
{
ch='c20';
len++;
}
break;
case '%':
ch='c'+text.charAt(++f)+text.charAt(++f);
break;
case '\n':
this.doc.write('<BR>');
continue;
}
this.doc.write('<IMG BORDER=0'+
(this.hSpace>0? ' HSPACE='+this.hSpace:'')+
(this.vSpace>0? ' VSPACE='+this.vSpace:'')+
(this.wd>0? ' WIDTH='+this.wd:'')+
(this.hg>0? ' HEIGHT='+this.hg:'')+
' SRC="'+this.url+ch+'.gif">');
len++;
}
}